<script type="text/javascript">
  jQuery(document).ready(function(){
    jQuery('#<?php echo $this->getElement()->getHTMLTagAttribute('id', TRUE) ?>').datepicker({
      dateFormat: '<?php echo $this->getElement()->getDateFormat() ?>',
      firstDay: '<?php echo $this->getElement()->getFirstDay() ?>',
      closeText: '<?php echo $this->getElement()->getCloseText() ?>',
      appendText: '<?php echo $this->getElement()->getAppendText() ?>',
      changeMonth: <?php echo $this->getElement()->getChangeMonth()?'true':'false' ?>,
      changeYear: <?php echo $this->getElement()->getChangeYear()?'true':'false' ?>,
      showButtonPanel: <?php echo $this->getElement()->getShowButtonPanel()?'true':'false' ?>,
      currentText: '<?php echo $this->getElement()->getCurrentText() ?>',
      nextText: '<?php echo $this->getElement()->getNextText() ?>',
      prevText: '<?php echo $this->getElement()->getPrevText() ?>',
      numberOfMonths: <?php echo $this->getElement()->getNumberOfMonths() ?>,
      dayNames: ['<?php echo join("','",$this->getElement()->getDayNames()) ?>'],
      dayNamesMin: ['<?php echo join("','",$this->getElement()->getDayNamesMin()) ?>'],
      monthNamesShort: ['<?php echo join("','",$this->getElement()->getMonthNamesShort()) ?>'],
      monthNames: ['<?php echo join("','",$this->getElement()->getMonthNames()) ?>'],
      duration: '<?php echo $this->getElement()->getDuration() ?>',
      minDate: new Date('<?php echo date('Y/m/d', $this->getElement()->getMinDate()) ?>'),
      maxDate: new Date('<?php echo date('Y/m/d', $this->getElement()->getMaxDate()) ?>'),
      defaultDate: new Date('<?php echo $this->getElement()->getValue() ?>'),
      yearRange: '<?php echo date('Y',$this->getElement()->getMinDate()),':',date('Y',$this->getElement()->getMaxDate()) ?>'
    });
  });
</script>
